<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/include.inc.jsp"%>
<!DOCTYPE html>

<html>
<head>
<%@include file="/WEB-INF/views/layout/base.ref.jsp"%>
<%@include file="/WEB-INF/views/layout/valid.ref.jsp"%>
<%@include file="/WEB-INF/views/layout/datepicker.ref.jsp"%>
</head>
<body>
	<form method="post" id="form1" action="${ctx}/security/securityaccount/save">
		<input type="hidden" name="id" value=" ${securityAccount.id}" />
		<%@include file="/WEB-INF/views/login/home/toolbar.jsp"%>
		<div class="mtcontent">

			<div class="mtheader">
				<shiro:hasPermission name="securityAccount:edit">
					<a class="mtbtn one" href="#" onclick="hrefSave_OnClick('form1')"><i class="mtfa mt-dui"></i><span>保存</span></a>
				</shiro:hasPermission>
				<a class="mtbtn two" href="#" onclick="hrefRet_OnClick('${ctx}/security/securityaccount/list')"><i
					class="mtfa mt-refresh"></i><span>返回</span></a>
			</div>


			<div class="mtbody">
				<div class="mtrow">
					<div class="mtcol">
						<label class="mtlabel">账号：</label>
						<c:if test="${securityAccount.id < 1}">
							<span class="block mtinput mticon-input mticon-input-right"> <input type="text" name="account"
								class="required" value="${securityAccount.account }" /><i class="mtfa mt-star mtred"></i>
							</span>
						</c:if>
						<c:if test="${securityAccount.id > 0}">
							<div class="mtinput">${securityAccount.account }</div>
						</c:if>
					</div>
				</div>
				<c:if test="${securityAccount.id < 1}">
					<div class="mtrow">
						<div class="mtcol">
							<label class="mtlabel">密码：</label> <span class="block mtinput mticon-input mticon-input-right"> <input
								type="password" name="pwd" class="required" value="${securityAccount.pwd }" /><i class="mtfa mt-star mtred"></i>
							</span>
						</div>
					</div>
				</c:if>
				<div class="mtrow">
					<div class="mtcol">
						<label class="mtlabel">序号：</label> <input type="text" class="mtinput" name="showOrder"
							value="${securityAccount.showOrder }" />
					</div>
				</div>
				<div class="mtrow">
					<div class="mtcol">
						<label class="mtlabel">状态：</label> <select name="isValid" class="mtinput">
							<option ${securityAccount.isValid==1?"selected='selected'":"" } value="1">有效</option>
							<option ${securityAccount.isValid==2?"selected='selected'":"" } value="2">无效</option>
						</select>
					</div>
				</div>
				<div class="mtrow">
					<div class="mtcol">
						<label class="mtlabel">角色：</label> <span class="block mtinput mticon-input mticon-input-right"><i
							class="mtfa mt-search mtblue mtpointer" id="roleSelect"></i> <input type="hidden" sysSelectResultName="result1_1"
							name="roleIds" value="${RoleIds}" /> <input sysSelectResultName="result2_1" type="text" value="${RoleNames}" />
						</span>
					</div>
				</div>
				<div class="mtrow">
					<div class="mtcol">
						<label class="mtlabel">账号类型：</label>
						<c:forEach items="${accountTypes}" var="accountType">
							<input type="checkbox" name="accountType" value="${accountType.id}"
								<c:if test="${accountType.ylzd1 ==1}">checked</c:if> />${accountType.name}
						</c:forEach>
					</div>
				</div>
			</div>
		</div>
	</form>
</body>
</html>
<script type="text/javascript">
	$(function() {
		//角色弹窗选择
		var roleOption = {
			el : "#roleSelect",
			host : "${ctx}",
			code : "sysRole",
			type : 1,
			index : 1
		}
		openSelectDialog(roleOption);
	});
</script>